import http from "../utils/http";
export default {
    cancelOrder(orderId) {
        return http.posts("/order/cancelOrder", { orderId })
    },
    cancelTimeOutOrder() {
        return http.post("/order/cancelTimeOutOrder")
    },
    cancelUserOrder(orderId) {
        return http.posts("/order/cancelUserOrder", { orderId })
    },
    confirmReceiveOrder(orderId) {
        return http.posts("/order/confirmReceiveOrder", { orderId })
    },
    deleteOrder(orderId) {
        return http.posts("/order/deleteOrder", { orderId })
    },
    detail(orderId) {
        return http.get("/order/detail/"+orderId)
    },
    generateConfirmOrder(cartIds) {
        return http.post("/order/generateConfirmOrder",cartIds)
    },
    generateOrder(cartIds,cids, couponId, memberReceiveAddressId, payType, useIntegration,note) {
        return http.post("/order/generateOrder", { cartIds, cids,couponId, memberReceiveAddressId, payType, useIntegration,note })
    },
    list(pageNum, pageSize, status) {
        return http.get("/order/list", { pageNum, pageSize, status })
    },
    pay(orderId, payType) {
        return http.posts("/order/pay", { orderId, payType })
    },
    productGenerateConfirmOrder(price,productAttr,productBrand,productCategoryId,productId,productName,productPic,productSkuCode,productSkuId,productSn,productSubTitle,quantity,flashPromotionId,flashPromotionProductRelationId,flashPromotionSessionId){
        return http.post("/order/productGenerateConfirmOrder", {price,productAttr,productBrand,productCategoryId,productId,productName,productPic,productSkuCode,productSkuId,productSn,productSubTitle,quantity,flashPromotionId,flashPromotionProductRelationId,flashPromotionSessionId})
    },
    resultGenerateOrder(cartItem,couponId,memberReceiveAddressId,payType,useIntegration,note,flashPromotionId,flashPromotionProductRelationId,flashPromotionSessionId,orderType){
        return http.post("/order/resultGenerateOrder", {cartItem,couponId,memberReceiveAddressId,payType,useIntegration,note,flashPromotionId,flashPromotionProductRelationId,flashPromotionSessionId,orderType})
    },
	trackingGetById(id){
	    return http.get("/order/trackingGetById/"+id)
	},
	orderRefund(orderId){	
	    return http.posts("/order/orderRefund/",{orderId})
	},
	notice(orderId){
		return http.post("/order/notice?id="+orderId)
	}
}